package com.cie2.janji.pages;

import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.annotations.Inject;

import com.cie2.janji.entities.Article;
import com.cie2.janji.services.ArticleService;

public class ArticleDetail {

	private Long articleId;
	
	@Property
	private Article article;
	
	//services
	@Inject
	private ArticleService articleService;	
	
	void onActivate(Long articleId) {
		this.articleId = articleId;
		
		article = articleService.load(articleId);
	}

	Long onPassivate() {
		return articleId;
	}	
}
